<?php
namespace app\modules\common\filters;

use Yii;
use yii\base\ActionFilter;

class ReqIdFilter extends ActionFilter
{
    public function beforeAction($action)
    {
        Yii::$app->request->setQueryParams([
            'reqId'=> md5(uniqid(). mt_rand(1, 1000000))
        ]);
        return parent::beforeAction($action);
    }
}
